cmake_minimum_required(VERSION 3.15)
project(MotorCTRL)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 17)

# 搜索源文件
file(GLOB SRC_FILES "*.cpp")
set(SOURCE_FILES ${SRC_FILES})
include_directories(${CMAKE_SOURCE_DIR}/include)

# 指定生成二进制文件路径
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)

# 添加可执行文件
add_executable(${PROJECT_NAME} ${SOURCE_FILES})

# 添加链接 pthread 库
find_package(Threads REQUIRED)
target_link_libraries(${PROJECT_NAME} Threads::Threads)

